
import pageRoutes from './router.config';
import defaultSettings from '../src/defaultSettings';

const { primaryColor } = defaultSettings;

// ref: https://umijs.org/config/
export default {
  treeShaking: true,
  // base: '/root',
  routes: pageRoutes,
  theme: {
    'primary-color': primaryColor,
  },
  plugins: [
    // ref: https://umijs.org/plugin/umi-plugin-react.html
    ['umi-plugin-react', {
      antd: true,
      dva: true,
      locale: {
        enable: true, // default false
        default: 'zh-CN', // default zh-CN
        baseNavigator: true, // default true, when it is true, will use `navigator.language` overwrite default
      },
      dynamicImport: true,
      dll: false,
      routes: {
        exclude: [
          /models\//,
          /services\//,
          /model\.(t|j)sx?$/,
          /service\.(t|j)sx?$/,
          /components\//,
        ],
      },
    }],
  ],
}
